package com.lhdx.practical.bean;

import com.lhdx.practical.utils.IDGenerator;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name="menuconfig")
public class MenuConfig {
    @Id
    private long id;

    /**
     * 年级信息
     */
    private long gradeid;
    private String gradename;
    /**
     * 栏目信息
     */
    private long menuid;
    @Transient
    private String menuidStr;
    private String menuname;
    /**
     * 责任老师信息
     */
    private long personid;
    @Transient
    private String personidStr;
    private String personname;

    public MenuConfig(){};

    public MenuConfig(Depart depart,Menu menu,long personid,String personname){
        this.id = IDGenerator.getID();
        this.gradeid = depart.getId();
        this.gradename = depart.getDepartname();
        this.menuid = menu.getId();
        this.menuname = menu.getMenuname();
        this.personid = personid;
        this.personname = personname;
    };

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getGradeid() {
        return gradeid;
    }

    public void setGradeid(long gradeid) {
        this.gradeid = gradeid;
    }

    public String getGradename() {
        return gradename;
    }

    public void setGradename(String gradename) {
        this.gradename = gradename;
    }

    public long getMenuid() {
        return menuid;
    }

    public void setMenuid(long menuid) {
        this.menuid = menuid;
    }

    public String getMenuname() {
        return menuname;
    }

    public void setMenuname(String menuname) {
        this.menuname = menuname;
    }

    public long getPersonid() {
        return personid;
    }

    public void setPersonid(long personid) {
        this.personid = personid;
    }

    public String getPersonname() {
        return personname;
    }

    public void setPersonname(String personname) {
        this.personname = personname;
    }

    public String getMenuidStr() {
        return this.menuid+"";
    }

    public void setMenuidStr(String menuidStr) {
        this.menuidStr = menuidStr;
    }

    public String getPersonidStr() {
        return this.personid+"";
    }

    public void setPersonidStr(String personidStr) {
        this.personidStr = personidStr;
    }
}
